import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/views/Index'
import Main from '@/views/Main'
import Recommentproduct from '@/views/main/RecommendProduct'
import ForgetPassword from '@/views/Forget-password'
import Mine from '@/views/main/Mine'
import Home from '@/views/main/Home'
import Login from '@/views/Login'
import Feedback from '@/views/Feedback'
import Myfoot from '@/views/My-foot'
import Myprofile from '@/views/My-profile'
import Aboutus from '@/views/About-us'
import Registerassociation from '@/views/Register-association'
import Helpcenter from '@/views/Help-center'
import Modifypassword from '@/views/Modify-password'
import Improveinformation from '@/views/Improve-information'
import Loanplatformdetail from '@/views/Loan-platform-detail'
import Setting from '@/views/Setting'
import Setpassword from '@/views/Set-password'
import Resetpassword from '@/views/Reset-password'
// import Password from '@/views/login/Password'
// import Changecode from '@/views/login/Changecode'
import Applyloan from '@/views/Apply-loan'
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Index',
      component: Index,
      redirect: '/main/home',
      children: [{
          path: '/main',
          name: 'main',
          component: Main,
          children:[{
            path:'home',
            name:'home',
            title: '水珠钱包',
            component:Home
          },
          {
            path:'recommentproduct',
            name:'recommentproduct',
            title: '水珠钱包',
            component:Recommentproduct
          },{
            path:'mine',
            name:'mine',
            title: '水珠钱包',
            component:Mine
          }
          ]
        },
        {
          path: 'login',
          name:'login',
          component: Login,
       
        },
        {
          path: 'forgetpassword',
          title: '忘记密码',
          name:'forgetpassword',
          component: ForgetPassword
        },
        {
          path: 'feedback',
          name: 'feedback',
          title: '我要反馈',
          component: Feedback
        },
         {
          path: 'applyloan',
          name: 'applyload',
          title:'填写借款资料',
          component: Applyloan
        },
        {
          path: 'myfoot',
          name: 'myfoot',
          title:'我的足迹',
          component: Myfoot
        },
        {
          path: 'aboutus',
          name: 'aboutus',
          title:'关于我们',
          component: Aboutus
        },
         {
          path: 'registerassociation',
          name: 'registerassociation',
          title:'水珠钱包注册协议',
          component: Registerassociation
        },
        {
          path: 'helpcenter',
          name: 'helpcenter',
          title:'帮助中心',
          component: Helpcenter
        },
        {
          path: 'modifypassword',
          name: 'modifypassword',
          title:'修改密码',
          component: Modifypassword
        },
        {
          path: 'improveinformation',
          name: 'improveinformation',
          title:'完善个人信息',
          component: Improveinformation
        },
        {
          path: 'loanplatformdetail',
          name: 'loanplatformdetail',
          title:'借款平台详情',
          component: Loanplatformdetail
        },
        {
          path: 'setting',
          name: 'setting',
          title:'设置',
          component: Setting
        },
        {
          path: 'setpassword',
          name: 'setpassword',
          title:'设置登录密码',
          component: Setpassword
        }
      ]
    },

  ]
})
